/**
 * model与接口字段的对应关系
 */

export default {
  friend: {
    uid: 'uid',
    state: 'state',
    updateDt: ({ updateDt }) => {
      return updateDt ? updateDt.toString() / 1 : ''
    },
    alias: ({ alias }) => {
      return alias || ''
    },
    friendOrigin: ({ friendOrigin }) => {
      return friendOrigin || 0
    }
  },

  group: {
    id: 'id',
    name: 'name',
    portrait: 'portrait',
    maxMemberCount: 'maxMemberCount',
    memberCount: 'memberCount'
  },

  groupMember: {
    alias: (data) => {
      return data.alias || ''
    },
    memberId: 'memberId',
    type: 'type',
    updateDt: 'updateDt',
    showName: (data) => {
      return data.showName
    },
    startMuteDt: (data) => {
      return data.startMuteDt.toString()
    },
    muteInterval: (data) => {
      return data.muteInterval
    },
    endMuteDt: (data) => {
      return data.endMuteDt.toString()
    }
  }
}
